import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

App.mpType = 'app'

import store from '@/store';

// 引入全局uView
import uView from 'uview-ui'
Vue.use(uView);

// 路由插件 https://hhyang.cn/v2/start/quickstart.html
import {router,RouterMount} from './router.js'
Vue.use(router)

const app = new Vue({
	store,
    ...App
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)

// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)


// 自定义工具
import untils from '@/common/untils.js'
Vue.use(untils, app)

let vuexStore = require("@/store/$u.mixin.js");
Vue.mixin(vuexStore);



// #ifdef H5
RouterMount(app,router,'#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
